<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>安卓自动兼容测试系统</title>
<script src="/Terminator/js/jquery-3.0.0.min.js">
	
</script>
<link rel="stylesheet" href="/Terminator/css/demo.css" type="text/css" />
<link rel="stylesheet" href="/Terminator/css/zTreeStyle.css"
	type="text/css" />
<link href="/Terminator/css/Share.css" rel="stylesheet" type="text/css">
<link href="/Terminator/css/testCase.css" rel="stylesheet"
	type="text/css">
<script type="text/javascript" src="/Terminator/js/demand.js">
	
</script>
<script type="text/javascript" src="/Terminator/js/popup.js">
	
</script>
<script src="/Terminator/js/angular.min.js"></script>
<link href="/Terminator/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet" />
<script src="/Terminator/js/moment-with-locales.min.js"></script>
<script src="/Terminator/js/bootstrap-datetimepicker.min.js">
	
</script>
<script src="/Terminator/js/ZeroClipboard.min.js"></script>
<script src="/Terminator/js/ngClip.js"></script>
<script src="/Terminator/js/bootstrap.min.js" type="text/javascript"></script>
<link href="/Terminator/css/bootstrap.css" rel="stylesheet" />

<script src="/Terminator/js/angular-animate.min.js">
	
</script>
<script src="/Terminator/js/toaster.min.js">
	
</script>
<script src="/Terminator/js/ui-bootstrap-tpls.js"></script>
<link href="/Terminator/css/toaster.min.css" rel="stylesheet" />
<script type="text/javascript"
	src="/Terminator/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript"
	src="/Terminator/js/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript"
	src="/Terminator/js/jquery.ztree.exedit-3.5.js"></script>

</head>
<body ng-app='testCaseApp' ng-controller='testCaseCtrl'
	data-ng-init="init()">
	<div align="center">
		<toaster-container></toaster-container>
	</div>
	<div id="selectResult"
		style="height: 100%; width: 100%; overflow-x: visible; overflow-y: visible;">
		<div class=" rowcol-md-12 panel panel-primary " style="height: 100%">
			<!--搜索工具栏开始-->
			<div class="input-group col-md-4 pull-right testCaseSelectMain"
				style="width: 100%; height: 15%">
				<div style="width: 23%; height: 100%; float: left;">
					<div class="testCaseSelect">
						<span class="selectDiv" style="line-height: 30px; width: 30%">开始：</span>
						<div class='input-group date' id='datetimepicker1'>
							<input type='text' class="form-control" id="datetimebegin"
								ng-model='beginTime' style="width: 100px;" readonly="readonly" />
							<span class="input-group-addon" style="width: 0%;"> <span
								class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
					<div class="testCaseSelect">
						<span class="selectDiv" style="line-height: 30px; width: 30%">结束：</span>
						<div class='input-group date' id='datetimepicker2'>
							<input type='text' class="form-control" id="datetimeend"
								ng-model='endTime' style="width: 100px;" readonly="readonly" />
							<span class="input-group-addon" style="width: 0%;"> <span
								class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
				</div>
				<div style="width: 27%; float: left; height: 100%;">
					<div class="testCaseSelect">
						<div class="isPublicClass" style="width: 30%;">
							<span class="isPublicText" style="line-height: 30px;">全部</span><input
								type="radio" name="caseAscr1" value='0'
								ng-model="statusFordemand" style="margin: 0;"
								ng-click='radioClick($event)' />
						</div>
						<div class="isPublicClass" style="width: 30%;">
							<span style="line-height: 30px;" class="isPublicText">启用</span><input
								type="radio" name="caseAscr1" value='1' ng-model="ssfordemand"
								style="margin: 0;" ng-click='radioClick($event)' />
						</div>
						<div class="isPublicClass" style="width: 30%;">
							<span style="line-height: 30px;" class="isPublicText">禁用</span><input
								type="radio" name="caseAscr1" value='2' ng-model="ssfordemand"
								style="margin: 0;" ng-click='radioClick($event)' />
						</div>
					</div>
					<div class="testCaseSelect">
						<div class="isPublicClass">
							<span class="isPublicText" style="line-height: 30px;">只看未过期的</span><input
								type="checkbox" ng-model='onlySeeSelf' style="margin: 0;"
								ng-click=''>
						</div>
					</div>
				</div>
				<div style="width: 20%; float: left; height: 100%;">
					<div class="testCaseSelect" style="float: left; width: 100%;">
						<input type="text" placeholder="请输入要搜索的关键字，模糊查询"
							class="form-control selectText" ng-model="selectKeyword"
							maxlength="20" size="20" style="height: 100%; width: 100%;" />
					</div>
				</div>
				<div style="width: 30%; float: left; height: 100%;">
					<div class=" testCaseSelect testCaseBtn"></div>
					<div class=" testCaseSelect testCaseBtn">
						<button type="button" class="btn btn-info"
							ng-click='selectDemand()'>查询</button>
						<button type="button" class="btn btn-info btn_add"
							ng-click="addDemandBtn()">增加</button>
					</div>
				</div>
			</div>
			<!--搜索工具栏结束-->
			<!--绑定表格开始-->
			<div
				style="width: 100%; height: 85%; overflow: scroll; overflow-x: hidden;">
				<table id="tb" border="1" cellspacing="0"
					style="table-layout: fixed; width: 100%"
					class="table table-striped table-bordered table-hover table-responsive">
					<tr>
						<th style="width: 5%">全选<input type="checkbox"
							ng-model='checkAll' ng-click='checkAllClick()' /></th>
						<th style="width: 30%">项目名称</th>
						<th style="width: 10%">项目状态</th>
						<th style="width: 20%">开始时间</th>
						<th style="width: 20%">结束时间</th>
						<th style="width: 10%">操作</th>
						<!--<th>编辑</th>  
                                <th>删除</th>-->
					</tr>
					<!--重复项开始，设置排序字段，数据源，names代表数据源，x表示names中遍历的每一个对象，id表示模糊搜索输入的内容，要与输入的input的ng-model一致，col表示排序名称，要与表头中一致-->
					<tr ng-repeat="x in testCases | filter: selectKeyword ">
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;"><input
							type="checkbox" ng-model='checkThis' ng-checked='checkThisB'
							ng-click='checkThisClick(x,checkThis)' /></td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.projectname}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.state}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.starttime}}</td>
						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">{{x.endtime}}</td>

						<td
							style="overflow: hidden; white-space: nowrap; text-shadow: gray;">
							<button class="btn-mine" ng-click="openEdit(x,whatName(x))">{{whatName(x)}}</button>
						</td>
					</tr>

				</table>
				<div class="row-fluid" ng-show="isShowPage">
					<div class="span6" style="width: 48.717948717948715%;">
						<div class="dataTables_info" id="sample_1_info">显示{{start}}
							到{{end}}&nbsp;&nbsp;&nbsp;&nbsp; 共查询到{{resultAllLength}}条数据</div>
					</div>
					<div class="span6"
						style="width: 48.717948717948715%; margin-top: -15px; float: right;">
						<div class="dataTables_paginate paging_bootstrap pagination"
							style="margin: 0; float: right; width: 100%">
							<ul style='float: right; width: 100%;'>
								<li class="prev " ng-class="{'disabled':p_current==1}"
									style="display: inline; float: left; margin-left: 20px;"><a
									ng-click="load_page(page-1)" href="javascript:void(0);">← <span
										class="hidden-480">上一页</span>
								</a></li>
								<%-- <li ng-if="p_current >= 5 && pageCount !== 5"><a
									href="javascript:void(0)">...</a></li>
								<li ng-repeat="page in pages"
									ng-class="{'active':p_current==page}"><a
									href="javascript:void(0);" ng-click="load_page(page)">{{page}}</a></li>
								<li ng-if="pageCount > 5 && 1 <= pageCount - 5"><a
									href="javascript:void(0)">...</a></li> --%>
								<li ng-if="page >= pageNum && lastPage !== pageNum"
									ng-click="load_page(1)" ng-class="{active:item==1}"
									style="display: inline; float: left; margin-left: 20px;"><a
									href="javascript:void(0)">1</a></li>
								<li ng-if="page >= pageNum && lastPage !== pageNum"><a
									href="javascript:void(0)"
									style="display: inline; float: left; margin-left: 20px;">...</a></li>
								<li style="display: inline; float: left; margin-left: 20px;"
									ng-class="{active:item==page}" ng-repeat="item in pages"><a
									href="javascript:void(0)" ng-click="load_page(item)">{{item}}</a></li>
								<li style="display: inline; float: left; margin-left: 20px;"
									ng-if="pageCount > pageNum && firstPage <= pageCount - pageNum">
									<a href="javascript:void(0)">...</a>
								</li>
								<li style="display: inline; float: left; margin-left: 20px;"
									ng-if="pageCount > pageNum && firstPage <= pageCount - pageNum"
									ng-click="load_page(pageCount)" ng-class="{active:item==page}"><a
									href="javascript:void(0)">{{pageCount}}</a></li>
								<li style="display: inline; float: left; margin-left: 20px;"
									class="next" ng-class="{'disabled':p_current==pageCount}"><a
									href="javascript:void(0);" ng-click="load_page(page+1)"><span
										class="hidden-480">下一页</span> → </a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<!--绑定表格结束-->
			<popup ng-show="isShow">
			<div class="mod-popup-example">{{showText}}</div>
			</popup>
		</div>
	</div>

	<div class="overlay" id="spm" style="display: none;"></div>
	<!-- 添加周计划弹出框 -->
	<div class="Popup"
		style="display: none; margin-top: -250px; margin-left: -666px; width: 1270px;">
		<!-- 隐藏div -->
		<div class="Popup_top">
			<input type="button" value="关闭" class="ClosePopu" align="middle"
				style="float: left;" ng-click='pupuClose()' /> <input type="button"
				value="提交" ng-show="isShowEditBtn" class="ClosePopu" align="middle"
				style="float: left;" ng-click='addDemand()' />
		</div>
		<div class="Popup_cen" style="padding-top: 0px;">
			<div style="width: 40%; height: 50%; float: left;">
				<div class="testCaseSelect">
					<span class="selectDiv" style="line-height: 30px; width: 30%">开始时间：</span>
					<div class='input-group date' id='datetimepickeradd'>
						<input type='text' class="form-control" id="datetimebeginadd"
							ng-model='beginTimeadd' style="width: 100px;" readonly="readonly" />
						<span class="input-group-addon" style="width: 0%;"> <span
							class="glyphicon glyphicon-calendar"></span>
						</span>
					</div>
				</div>
				<div class="testCaseSelect">
					<span class="selectDiv" style="line-height: 30px; width: 30%">结束时间：</span>
					<div class='input-group date' id='datetimepickeradd2'>
						<input type='text' class="form-control" id="datetimeendadd"
							ng-model='endTimeadd' style="width: 100px;" readonly="readonly" />
						<span class="input-group-addon" style="width: 0%;"> <span
							class="glyphicon glyphicon-calendar"></span>
						</span>
					</div>
				</div>
			</div>
			<div style="width: 30%; height: 50%; float: left;">
				<div class="testCaseSelect">
					<input type="text" placeholder="请输入项目名称"
						class="form-control
				selectText" ng-model="demandContent"
						maxlength="20" size="20" style="height: 100%; width: 100%;" />
				</div>
				<div class="testCaseSelect">
					<div class="isPublicClass" style="width: 30%;">
						<span style="line-height: 30px;" class="isPublicText">启用</span><input
							type="radio" name="caseAscr" value="1"
							ng-model="statusFordemandadd" style="margin: 0;"
							ng-click='radioClickadd($event)' />
					</div>
					<div class="isPublicClass" style="width: 30%;">
						<span style="line-height: 30px;" class="isPublicText">禁用</span><input
							type="radio" name="caseAscr" value="2"
							ng-model="statusFordemandadd" style="margin: 0;"
							ng-click='radioClickadd($event)' />
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
